//
//  MainViewDataSource.m
//  HypERLtrace
//
//  Created by Vladimir Sarpe on 01/08/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import "MainDataSource.h"


@implementation MainDataSource

- (id)init {
	if (self = [super init]) {
		buffer = [[NSArray alloc] init];
	}
	return self;
}

- (id) tableView:(NSTableView*)aTableView objectValueForTableColumn:(NSTableColumn*)aTableColumn row:(int)rowIndex {
	return [[buffer objectAtIndex:rowIndex] valueForKey:[aTableColumn identifier]];
}

- (int) numberOfRowsInTableView:(NSTableView*)aTableView {
	return [buffer count];
}

- (void) growlNotificationWasClicked:(id)clickContext {
	
}

- (void) updateData:(NSArray*)newData {
	buffer = newData;
}

@end
